<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
 <TITLE>SDCC Compiler User Guide: Appendix A: The Z80 and gbz80 port</TITLE>
 <LINK HREF="SDCCUdoc-30.html" REL=previous>
 <LINK HREF="SDCCUdoc.html#toc31" REL=contents>
</HEAD>
<BODY>
Next
<A HREF="SDCCUdoc-30.html">Previous</A>
<A HREF="SDCCUdoc.html#toc31">Contents</A>
<HR>
<H2><A NAME="s31">31. Appendix A: The Z80 and gbz80 port</A> </H2>

<P>2.2.0 can target both the Zilog Z80 and the Nintendo Gameboy's Z80-like
gbz80. The port is incomplete - long support is incomplete (mul, div and mod
are unimplimented), and both float and bitfield support is missing, but apart
from that the code generated is correct.
<P>As always, the code is the authoritave reference - see z80/ralloc.c and
z80/gen.c. The stack frame is similar to that generated by the IAR Z80 compiler.
IX is used as the base pointer, HL is used as a temporary register, and BC
and DE are available for holding varibles. IY is currently unusued. Return
values are stored in HL. One bad side effect of using IX as the base pointer
is that a functions stack frame is limited to 127 bytes - this will be fixed
in a later version.bc
<P>9
<P>
<HR>
Next
<A HREF="SDCCUdoc-30.html">Previous</A>
<A HREF="SDCCUdoc.html#toc31">Contents</A>
</BODY>
</HTML>
